home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d11
/
egafnt25.arc
/
RESPONSE.DOC
< prev
next >
Wrap
Text File
|
1990-07-08
|
1KB
|
39 lines
RESPONSE.COM - SET ERRORLEVEL FOR INTERCATIVE BATCH FILES
THIS IS A FAIRLY SIMPLE PROGRAM IN CONCEPT: IT SETS THE ERRORLEVEL
CODE FOR BATCH FILES BASED ON THE USER'S INPUT. ALSO, IT WILL NOT
ACCEPT ANYTHING BUT A CORRECT RESPONSE CHARACTER, HELPING FUMBLE-
FINGERED PEOPLE LIKE THE AUTHOR (GLEN MARSHALL). ENJOY!
EXAMPLES:
1) SIMPLE Y/N INPUT:
ECHO DO YOU WANT A CROSS-REFERENCE LISTING?
RESPONSE YN
IF ERRORLEVEL 2 GOTO NOCREF
THE ERRORLEVEL IS SET TO 1 FOR "Y" (ITS POSITION IN THE
RESPONSE PARAMETER STRING), OR 2 FOR "N".
2) MENU CHOICE:
ECHO PLEASE CHOOSE ONE:
ECHO A) FIRST OPTION D) FOURTH OPTION
ECHO B) SECOND OPTION E) FIFTH OPTION
ECHO C) THIRD OPTION F) SIXTH OPTION
RESPONSE ABCDEF
NOTE THAT THE RESPONSE PARAMETER CAN CONTAIN ANY ALPHANUMERIC
CHARACTERS IN ANY ORDER. THE ERRORLEVEL CODE IS SET BASED ON
THE RESPONSE INPUT'S POSITION IN THE PARAMETER STRING.
Marty Shannon Note: You must test for responses in the reverse order that they
are listed on the RESPONSE line in order for this program to work correctly.
HARACTERS IN ANY ORDER. THE ERRORLEVEL CODE IS SET BASED ON
THE RESPONSE INPUT